<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/sys/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加通知</title>
<%@ include file="/WEB-INF/sys/include/css.jsp"%>
<link href="${path}/res/js/webuploader/webuploader.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form" action="${path}/cms/qxNotices/save.json" method="post">
<div class="form">
	<div class="title">添加通知信息</div>
	<div class="group">
		<div class="label">*通知标题:</div>
		<div class="item"><input type="text" name="title" id="title" maxlength="100" /></div>
	</div>
	<div class="group" style="overflow: visible;">
		<div class="label">通知内容:</div>
		<div class="item">
			<script id="contents" name="contents" type="text/plain" style="width:800px;height:350px;"></script>
		</div>
	</div>
	<div class="group">
		<div class="label">*发布人:</div>
		<div class="item"><input type="text" name="pubUser" id="pubUser" maxlength="50" value="${pubUser }" /></div>
	</div>
	<div class="group">
		<div class="label">*发布日期:</div>
		<div class="item"><input type="text" name="pubDate" id="pubDate" ltype="date" value="${pubDate }" /></div>
		<div class="item" id="pubDateTip"></div>
	</div>
	<div class="group">
		<div class="label">通知附件:</div>
		<div class="item"><div id="qxNoticesAttachments" class="myuploader"></div></div>
	</div>
	<div class="buttons">
		<button class="highlight" id="submit1" type="button">确定</button>
		<button type="button" id="cancel1">取消</button>
	</div>
	
</div>
</form>
<%@ include file="/WEB-INF/sys/include/script.jsp" %>
<script type="text/javascript" src="${path}/res/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="${path}/res/js/ueditor/ueditor.all.min.js"></script>
<script src="${path}/res/js/webuploader/webuploader.min.js" type="text/javascript"></script>
<script src="${path}/res/js/webuploader/myUploader.js" type="text/javascript"></script>
<script type="text/javascript">
var attachmentsmyuploader;
$(function() {
	attachmentsmyuploader = $("#qxNoticesAttachments").myUploader({
		uploadDir: "cms_attachment",
		type: "attachment",
		canEditDesc: false
	});
	ue = UE.getEditor('contents', {});
	$("#form").ligerForm({inputWidth: 400});
	
	verifyForm("form", {}, function(){
		$("#form").ajaxForm(function(data){
			UiUtil.isSuccess(data, "添加通知信息成功", function(){
				UiUtil.closeForm(true);
			});
		});
	});
	
	$("#submit1").click(function(){
		UiUtil.lockButton('submit1');
		if(!attachmentsmyuploader.isDone()){
			UiUtil.unlockButton('submit1');
			return
		}
		$("#form").submit();
	});

	$("#cancel1").click(function(){
		UiUtil.closeForm();
	});
	
});
</script>
</body>
</html>